<local:DocumentBase x:Class="WPFExcelReport.YCAAB05DOC"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Background="White"
                    
                    FontSize="16"
                    Loaded="Window_Loaded"
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <CollectionViewSource   x:Key="vwABKOPF" Source="{Binding Path=ABKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwABPOS" Source="{Binding Path=ABPOS,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <Grid   >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="74" />
            <RowDefinition Height="157*" />
            <RowDefinition Height="231*" />
            <RowDefinition Height="55*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="79*"></ColumnDefinition>
            <ColumnDefinition Width="361*" />
            <ColumnDefinition Width="207*"></ColumnDefinition>
            <ColumnDefinition Width="233*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0"
            Grid.ColumnSpan="4" Orientation="Horizontal" >
            <TextBlock FontSize="18"  Height="40"   Width="59" Name="txt1" Margin="0,0,0,0" Text="{Binding Source={Localization:Translate Word=生产单}}" VerticalAlignment="Bottom" />
            <TextBox Background="Yellow"  FontSize="18"  Height="36"   Width="40" Name="txtABPAUFKRS" CharacterCasing="Upper" Margin="10,0,0,0"  />
            <TextBox Background="White"  FontSize="18" Height="36"    Width="80" Name="txtABPAUFLFD"  KeyUp="txtABPAUFLFD_KeyUp" Margin="15,0,0,0" />
            <Button FontSize="18" Content ="{Binding Source={Localization:Translate Word=查询}}" Height="40" Margin="20,0,0,0" Click="btnQuery_Click"></Button>
            <Button Content="{Binding Source={Localization:Translate Word=打印合同}}"  FontSize="18" Height="40" Margin="20,0,0,0"  Width="Auto" Click="btnPrint_Click"/>
            <Button Content="{Binding Source={Localization:Translate Word=打印原料清单}}"  FontSize="18" Height="40" Margin="20,0,0,0"  Width="Auto" Click="btnPrintMat_Click"/>
        </StackPanel>
        <DataGrid CanUserReorderColumns="True"  
                  CanUserResizeRows="True" CanUserSortColumns="True"                  
                  AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                  IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                  ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS}}"  x:Name="ABPOSDataGrid" 
                  Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2" Grid.RowSpan="3">
            <DataGrid.Columns>
                <DataGridTextColumn  Binding="{Binding ABPAUFKRS}" Width="40"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=生产单}}" Binding="{Binding ABPAUFLFD}" Width="80"/>
                <DataGridTextColumn Binding="{Binding ABPAUFPOS}" Width="40"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=品种}}" Binding="{Binding ABPART}" Width="160"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=色号}}" Binding="{Binding ABPFARBE}" Width="80"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=尺码}}" Binding="{Binding ABPGROE}" Width="80"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=PCS}}" Binding="{Binding Path=ABPSOLLMENGE7, Converter={StaticResource ResourceKey=d100}}" Width="80"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=开始}}" Binding="{Binding ABPSTARTDAT}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=交期}}" Binding="{Binding ABPENDDAT}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=行备注}}" Binding="{Binding REMARK, Converter={StaticResource ResourceKey=gb2312}}" Width="200"/>
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</local:DocumentBase>
